<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	async function fn(promiseList){
		const result = await Promise.all(promiseList)
		if(result.length > 0){
			result.forEach(item => {
				console.log(item)
			})
		}
	}
	
	// 示例 promiseList
	const promiseList = [
		new Promise((resolve) => setTimeout(() => resolve(0), 1000)),
		new Promise((resolve) => setTimeout(() => resolve(1), 2000)),
		new Promise((resolve) => setTimeout(() => resolve(2), 3000)),
		new Promise((resolve) => setTimeout(() => resolve(3), 1500)),
	];
	
	// 调用函数
	fn(promiseList);
</script>
</html>